<template>
  <div class="home">
    <el-row :gutter="20">
      <el-col :span="6">
        <div class="grid-content bg-purple">
          <h3>新品首发</h3>
          <el-carousel :interval="4000" type="card" height="200px">
            <el-carousel-item>
              <img class="i1" src="../assets/lb.webp" alt="" />
              <h4>RMB:3499</h4>
            </el-carousel-item>
            <el-carousel-item>
              <img class="i1" src="../assets/lb1.webp" alt="" />
              <h4>RMB:11999</h4>
            </el-carousel-item>
            <el-carousel-item>
              <img class="i1" src="../assets/lb2.webp" alt="" />
              <h4>RMB:2399</h4>
            </el-carousel-item>
            <el-carousel-item>
              <img class="i1" src="../assets/lb3.webp" alt="" />
              <h4>RMB:4999</h4>
            </el-carousel-item>
          </el-carousel>
        </div>
      </el-col>
      <el-col :span="6">
        <div class="grid-content bg-purple">
          <h3>排行榜</h3>
          <div class="daohang">
            <el-tabs v-model="activeName" @tab-click="handleClick">
              <el-tab-pane label="手机" name="first">
                <div class="bq1">
                  <ul class="sj">
                    <li><img src="../assets/lb1.webp" /></li>
                    <span class="s1">RMB:1234</span>
                    <li><img src="../assets/lb1.webp" /></li>
                    <span class="s1">RMB:1234</span>
                    <li><img src="../assets/lb1.webp" /></li>
                    <span class="s1">RMB:1234</span>
                  </ul>
                </div>
              </el-tab-pane>
              <el-tab-pane label="音箱/音响" name="second">
                <div class="bq1">
                  <ul class="sj">
                    <li><img src="../assets/lb2.webp" /></li>
                    <span class="s1">RMB:456</span>
                    <li><img src="../assets/lb2.webp" /></li>
                    <span class="s1">RMB:456</span>
                    <li><img src="../assets/lb2.webp" /></li>
                    <span class="s1">RMB:456</span>
                  </ul>
                </div></el-tab-pane
              >
              <el-tab-pane label="口红" name="third"
                ><div class="bq1">
                  <ul class="sj">
                    <li><img src="../assets/lb3.webp" /></li>
                    <span class="s1">RMB:678</span>
                    <li><img src="../assets/lb3.webp" /></li>
                    <span class="s1">RMB:678</span>
                    <li><img src="../assets/lb3.webp" /></li>
                    <span class="s1">RMB:678</span>
                  </ul>
                </div></el-tab-pane
              >
              <el-tab-pane label="电脑整机" name="fourth"
                ><div class="bq1">
                  <ul class="sj">
                    <li><img src="../assets/lb.webp" /></li>
                    <span class="s1">RMB:789</span>
                    <li><img src="../assets/lb.webp" /></li>
                    <span class="s1">RMB:789</span>
                    <li><img src="../assets/lb.webp" /></li>
                    <span class="s1">RMB:789</span>
                  </ul>
                </div></el-tab-pane
              >
            </el-tabs>
          </div>
        </div>
      </el-col>
      <el-col :span="6">
        <div class="grid-content bg-purple">
          <h3>逛好店</h3>
        </div>
      </el-col>
      <el-col :span="6">
        <div class="grid-content bg-purple">
          <h3>领卷中心</h3>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
// @ is an alias to /src

export default {
  name: "Home",
  data() {
    return {
      activeName: "second",
    };
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
  },
};
</script>
<style>

.el-tabs__item {
  padding: 0 17px;
}
</style>
<style scoped>
.s1 {
  margin-left: 200px;
  position: absolute;
  left: 40px;
  margin-top: -40px;
}
.sj {
  position: relative;
  left: -100px;
}
.sj > li {
  list-style: none;
  line-height: 31px;
}
.sj > li > img {
  width: 25%;
}
.daohang {
  width: 276px;
  margin: auto;
}
.i1 {
  width: 80%;
  margin-top: 10%;
}
.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 200px;
  margin: 0;
}

h3 {
  text-align: left;
  margin-left: 10px;
}
.home {
  padding: 0;
  margin: 0;
  overflow-x: hidden;
  width: 1200px;
  margin: auto;
}
.el-row {
  margin-bottom: 20px;
}
.el-row:last-child {
  margin-bottom: 0;
}
.el-col {
  border-radius: 4px;
}
.bg-purple-dark {
  background: #c9d2df;
}
.bg-purple {
  background: #cbcfd5;
}
.bg-purple-light {
  background: #e5e9f2;
}
.grid-content {
  border-radius: 4px;
  min-height: 36px;
  height: 350px;
}
.row-bg {
  padding: 10px 0;
  background-color: #f9fafc;
}
</style>